package com.info.zhiduoduo.repository.entity.company;

import com.baomidou.mybatisplus.activerecord.Model;
import com.baomidou.mybatisplus.annotations.TableField;
import com.baomidou.mybatisplus.annotations.TableId;
import com.baomidou.mybatisplus.annotations.TableLogic;
import com.baomidou.mybatisplus.annotations.TableName;
import com.baomidou.mybatisplus.enums.IdType;

import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;

import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.experimental.Accessors;

/**
 * <p>
 *   企业委托函
 * </p>
 *
 * @author Bob
 * @since 2021-11-04
 */
@Data
@Accessors(chain = true)
@TableName("zdd_company_entrust_file")
public class CompanyEntrustFile extends Model<CompanyEntrustFile> {

    private static final long serialVersionUID = 1L;

    /**
     * 主键
     */
    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;
    /**
     * 企业id
     */
    private Integer compid;
    /**
     * 企业名称
     */
    @TableField(exist = false)
    private String compname;
    /**
     * 委托文件
     */
    private String entrustFile;
    /**
     * 委托开始时间
     */
    private Date entrustStartTime;
    /**
     * 委托结束时间
     */
    private Date entrustEndTime;
    /**
     * 1:生效 2:失效
     */
    @ApiModelProperty("文件状态(1:生效 2:失效 3已过期)")
    private Integer state;
    @ApiModelProperty("文件来源(1:admin管理端（默认），2:企业端在线签署)")
    private Integer source;
    // 在线填写的信息
    @ApiModelProperty("从事业务")
    private String business;
    @ApiModelProperty("企业账号管理员")
    private String manage;
    @ApiModelProperty("手机号")
    private String mobile;

    @ApiModelProperty("运营主体")
    private Integer partyId;
    @ApiModelProperty("运营主体名称")
    @TableField(exist = false)
    private String partyName;

    @ApiModelProperty("审核状态(1:未审核 2:已通过 3:已驳回)")
    private int auditState;

    @ApiModelProperty("审核意见")
    private String auditMsg;

    private Date createtime;
    private Date updatetime;

    @ApiModelProperty("逻辑删除")
    @TableLogic
    private Boolean deleted;

    @ApiModelProperty("企业顾问")
    @TableField(exist = false)
    private String corporateConsultant;

    @ApiModelProperty("跟单员名称")
    @TableField(exist = false)
    private String merchandiserName;

    @ApiModelProperty("众包费率")
    @TableField(exist = false)
    private BigDecimal taxRate;

    @ApiModelProperty("众包项目类型(1:智众包，2:智零工)")
    private Integer workType;

    @Override
    protected Serializable pkVal() {
        return this.id;
    }

}
